package com.dkm.ec.sale.persistence.entity;

import com.dkm.ec.product.persistence.entity.ProdCatePo;
import com.dkm.ec.product.persistence.entity.ProductMediaPo;
import com.dkm.ec.stock.persistence.entity.StockPo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 对象功能:销售产品SKU entity对象
 * 开发公司:SKG.COM
 * 开发人员:Yuki
 * 创建时间:2015-01-22 13:52:18
 */
public class SaleSkuPo extends SaleSkuTbl{
	private static final long serialVersionUID = 1L;
	private String shopId;
	private Double salesPrice; //销售价
	private Double wholePrice; //进货价
	private Double prePrice; //预售价
	private Double backPrice; //缺货销售价
	private Double secondKillPrice; //秒杀价
	private Double rushPrice; //抢购价
	private Double mobilePrice; //手机价
	private Double point; //手机价
	
	private String mainCloudPath;//产品主图路径
	
	private String mainSkuCloudPath;//sku主图路径
	
	private ProductMediaPo productMediaPo;//产品主图
	
	private Map<String,Object> imgSizeMap;
	
	private SaleEntityPo saleEntityPo;//产品信息
	
	private List<SalePricePo> salePricePos;
	
	private SaleEntityStatPo saleEntityStatPo;
	
	private String tempId;
	
	private String name;
	
	private String skuSpec;
	private String productKey;
	private Integer maxTotal;
	private String stockStatus; //库存状态
	private Integer inventoryQty;	//库存
	private String seType;	//'产品形态。entity=实体产品；package=产品套餐；software=软体产品；service=服务'
	
	private String skuId ; //产品包ID(套餐-产品包功能);
	private Integer itemCount; //产品包的商品数量
	private String salePackageItemId; //套餐产品包id
	
	private String salesType;	//销售类型

	private List<SaleSkuPo> packageSaleSkuPos;		//被包含的套餐列表
	private String productName;

	private StockPo stockPo; // 库存信息
	
	private BigDecimal discountAmount = BigDecimal.ZERO;		//套餐优惠价（套餐销售价相对于套餐内商品加总原销售价的差额）
	public String getSkuId() {
		return skuId;
	}
	
	public String getShopId() {
		return shopId;
	}

	public void setShopId(String shopId) {
		this.shopId = shopId;
	}

	public String getProductName() {
		return productName;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}

	public Integer getItemCount() {
		return itemCount;
	}

	public void setItemCount(Integer itemCount) {
		this.itemCount = itemCount;
	}
	
	

	public String getSalePackageItemId() {
		return salePackageItemId;
	}

	public void setSalePackageItemId(String salePackageItemId) {
		this.salePackageItemId = salePackageItemId;
	}



	private List<SaleSkuTagPo> saleSkuTagPos;
	
	
	private List<ProductMediaPo> productMediaPoList;//产品媒体
	
	private List<ProdCatePo> prodCatePos;
	
	private String subName;
	
	public List<ProdCatePo> getProdCatePos() {
		return prodCatePos;
	}

	public void setProdCatePos(List<ProdCatePo> prodCatePos) {
		this.prodCatePos = prodCatePos;
	}

	private String groupId;
	
	public Double getSalesPrice() {
		return salesPrice;
	}

	public void setSalesPrice(Double salesPrice) {
		this.salesPrice = salesPrice;
	}

	public String getMainCloudPath() {
		return mainCloudPath;
	}

	public void setMainCloudPath(String mainCloudPath) {
		this.mainCloudPath = mainCloudPath;
	}

	/*public Map<String, Object> getAttrDataMap() {
		return attrDataMap;
	}

	public void setAttrDataMap(Map<String, Object> attrDataMap) {
		this.attrDataMap = attrDataMap;
	}*/

	public String getGroupId() {
		return groupId;
	}

	public String getSeType() {
		return seType;
	}

	public void setSeType(String seType) {
		this.seType = seType;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public SaleEntityPo getSaleEntityPo() {
		return saleEntityPo;
	}

	public void setSaleEntityPo(SaleEntityPo saleEntityPo) {
		this.saleEntityPo = saleEntityPo;
	}

	public Map<String, Object> getImgSizeMap() {
		return imgSizeMap;
	}

	public void setImgSizeMap(Map<String, Object> imgSizeMap) {
		this.imgSizeMap = imgSizeMap;
	}

	public List<SalePricePo> getSalePricePos() {
		return salePricePos;
	}

	public void setSalePricePos(List<SalePricePo> salePricePos) {
		this.salePricePos = salePricePos;
	}

	public SaleEntityStatPo getSaleEntityStatPo() {
		return saleEntityStatPo;
	}

	public void setSaleEntityStatPo(SaleEntityStatPo saleEntityStatPo) {
		this.saleEntityStatPo = saleEntityStatPo;
	}

	public ProductMediaPo getProductMediaPo() {
		return productMediaPo;
	}

	public void setProductMediaPo(ProductMediaPo productMediaPo) {
		this.productMediaPo = productMediaPo;
	}

	public String getMainSkuCloudPath() {
		return mainSkuCloudPath;
	}

	public void setMainSkuCloudPath(String mainSkuCloudPath) {
		this.mainSkuCloudPath = mainSkuCloudPath;
	}

	public String getSkuSpec() {
		return skuSpec;
	}

	public void setSkuSpec(String skuSpec) {
		this.skuSpec = skuSpec;
	}
	
	public String getKey(){
		if("delete".equals(this.status)){
			int i = this.key.indexOf("_SS_");
			if(i > 0){
				return this.key.substring(0, i);
			}else{
				return this.key;
			}
		}else{
			return this.key;
		}
	}
	
	public String getKeyDelete(){
		if("delete".equals(this.status)){
			return this.key;
		}else{
			return "";
		}
	}

	public List<SaleSkuTagPo> getSaleSkuTagPos() {
		return saleSkuTagPos;
	}

	public void setSaleSkuTagPos(List<SaleSkuTagPo> saleSkuTagPos) {
		this.saleSkuTagPos = saleSkuTagPos;
	}

	
	
	public String getProductKey() {
		return productKey;
	}

	
	public void setProductKey(String productKey) {
		this.productKey = productKey;
	}

	public Integer getMaxTotal() {
		return maxTotal;
	}

	public void setMaxTotal(Integer maxTotal) {
		this.maxTotal = maxTotal;
	}

	public List<ProductMediaPo> getProductMediaPoList() {
		return productMediaPoList;
	}

	public void setProductMediaPoList(List<ProductMediaPo> productMediaPoList) {
		this.productMediaPoList = productMediaPoList;
	}

	public String getStockStatus() {
		return stockStatus;
	}

	public void setStockStatus(String stockStatus) {
		this.stockStatus = stockStatus;
	}

	public Integer getInventoryQty() {
		return inventoryQty;
	}

	public void setInventoryQty(Integer inventoryQty) {
		this.inventoryQty = inventoryQty;
	}

	public String getSubName() {
		return subName;
	}

	public void setSubName(String subName) {
		this.subName = subName;
	}

	public Double getWholePrice() {
		return wholePrice;
	}

	public void setWholePrice(Double wholePrice) {
		this.wholePrice = wholePrice;
	}

	public Double getPrePrice() {
		return prePrice;
	}

	public void setPrePrice(Double prePrice) {
		this.prePrice = prePrice;
	}

	public Double getBackPrice() {
		return backPrice;
	}

	public void setBackPrice(Double backPrice) {
		this.backPrice = backPrice;
	}

	public Double getSecondKillPrice() {
		return secondKillPrice;
	}

	public void setSecondKillPrice(Double secondKillPrice) {
		this.secondKillPrice = secondKillPrice;
	}

	public Double getRushPrice() {
		return rushPrice;
	}

	public void setRushPrice(Double rushPrice) {
		this.rushPrice = rushPrice;
	}

	public String getSalesType() {
		return salesType;
	}

	public void setSalesType(String salesType) {
		this.salesType = salesType;
	}
	public List<SaleSkuPo> getPackageSaleSkuPos() {
		return packageSaleSkuPos;
	}

	public void setPackageSaleSkuPos(List<SaleSkuPo> packageSaleSkuPos) {
		this.packageSaleSkuPos = packageSaleSkuPos;
	}

	public BigDecimal getDiscountAmount() {
		return discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	public Double getMobilePrice() {
		return mobilePrice;
	}

	public void setMobilePrice(Double mobilePrice) {
		this.mobilePrice = mobilePrice;
	}

	public String getTempId() {
		return tempId;
	}

	public void setTempId(String tempId) {
		this.tempId = tempId;
		this.id=tempId;
	}

	public Double getPoint() {
		return point;
	}

	public void setPoint(Double point) {
		this.point = point;
	}

	public StockPo getStockPo() {
		return stockPo;
	}

	public void setStockPo(StockPo stockPo) {
		this.stockPo = stockPo;
	}
}